<template>
  <div class="bg-white">
    <qul-edit ref="qul" :content="this.currSeriesInfo.describe">
    </qul-edit>
  </div>
  <el-button type="primary" @click="SetCurrSeriesIntroduction">
    提交
  </el-button>


</template>

<script>
import QulEdit from "@/components/qulEdit";
import axios from "axios";
import {ElMessage} from "element-plus";

export default {
  name: "CurriculumIntroduction",
  components: {QulEdit},
  created() {
    this.currSeriesInfo = this.$ses.getSesWithParse(this.$route.query.resId)
    this.seriesId = this.currSeriesInfo.seriesId
    console.log()
  },
  mounted() {
  },
  data() {
    return {
      seriesId: '',
      currSeriesInfo:{}
    }
  },
  methods: {
    SetCurrSeriesIntroduction() {
      axios.post('/api/teacher/SetCurrSeriesIntroduction', {
        seriesId: this.seriesId,
        introduction: this.$refs.qul.covert2Html()
      }).then((res) => {
        if (res.status === 200) {
          ElMessage.success({message: '修改成功'})
          this.$jump.mtJumpNp('curriculumSeries')
        }
      })
    }
  }
}
</script>

<style scoped>

</style>